<?php
/**
 * +--------------------------------------------------------+
 * @Created by Phpstorm.
 * @Category CollectArticleJob.php
 * @Depiction
 * @Author hwy <429208948@qq.com>
 * @Date 2022/6/17  19:37
 * +--------------------------------------------------------+
 */

namespace App\Jobs;


use App\Repositories\CollectArticleRepository;
use App\Services\StockArticleService;
use App\Util\Container;
use App\Util\DingDing;
use Illuminate\Support\Facades\Log;

class CollectArticleJob extends Job
{

    //
    protected $data;

    /**
     * 任务可尝试的次数
     *
     * @var int
     */
    public $tries = 5;

    protected $collectArticleRepository;

    /**
     * Create a new job instance.
     *
     * @return void
     */
    public function __construct($data)
    {
        $this->data = $data;
    }


    /**
     * Execute the job.
     *
     * @return void
     */
    public function handle()
    {
        $insert_data = $this->data;
        $collectArticleRepository = Container::run(CollectArticleRepository::class, 'addData', $insert_data);;

        return true;
    }

}
